#include <algorithm>
#include <list>
#include <vector>
#include <iterator>
#include <ctime>


using namespace std;

void InserterTest()
{
list<int> ilst;
vector<int> ivec;
int value = 0;
for(int i = 0; i < 20; i ++)
{
	// srand(time(NULL)); // Initialize random seed. Leads to the same value??
	/*ilst.push_back(rand());
	ivec.push_back(rand());*/

	ilst.push_back(i + 1);
	ivec.push_back(i * 2 + 100);
}

list<int>::iterator it = find(ilst.begin(), ilst.end(), 15);

replace_copy(ivec.begin(), ivec.end(), inserter(ilst, it), 100, 0);
	
}